Magic lamp

From NetHackWiki
Jump to navigation Jump to search
( Lamp.png
Name magic lamp
Appearance lamp
Base price 50 zm
Weight 20
Material copper
Monster use Will not be used by monsters.

A magic lamp is a type of magical tool that appears in NetHack. It is a light source that is made of copper, and appears as a lamp when unidentified.

The magic lamp is the subject of a few rumors, all but one of which are true.

Generation

Magic lamps make up 3200 (1.5%) of all tools randomly generated on the ground, in general shops or as death drops. Hardware stores and lighting shops can also stock magic lamps. A magic lamp will generate as blessed 14 (25%) of the time, uncursed 12 (50%) of the time and cursed the remaining 14 (25%) of the time.

Magic lamps cannot be generated by polypiling, and wishing for a magic lamp will instead produce an ordinary oil lamp.

Description

Applying a magic lamp is much like applying an oil lamp: a lit magic lamp will illuminate a 3-square radius around it, but unlike a normal oil lamp it will never run out of fuel (though its light can still be put out through normal means).

Additionally, each time the hero rubs a magic lamp, there is a 13 chance of a puff of smoke, a 13 chance that nothing happens, and a 13 chance of a djinni appearing. If a djinni appears, the lamp is then identified and turns into an oil lamp of the same beatitude with fuel for 1000-1500 turns, and the djinni's behavior is as follows, with probabilities depending on the lamp's beatitude:[1][2]

Blessed Uncursed Cursed Outcome
80% 20% 5% Grants one wish, then disappears.
"I am in your debt. I will grant one wish!"
5% 20% 5% Remains as a pet.
"Thank you for freeing me!"
5% 20% 5% Remains as a peaceful monster.
"You freed me!"
5% 20% 5% Speaks, then vanishes.
"It is about time!"
5% 20% 80% Remains as a "normally generated" monster, and may be peaceful for a neutral hero.
"You disturbed me, fool!"

Strategy

Always make sure a magic lamp is blessed before rubbing it, as an early magic lamp stands a high chance of being wasted if you rub it without knowing its beatitude. Be wary of rubbing unpaid magic lamps as well, as the shopkeeper will charge you a use fee if you manage to extract the genie—thankfully, magic lamps are easily distinguished from normal ones by price.

Some players prefer to use the magic lamp for a light source rather than an extra wish, depending on circumstances: the lamp is a useful tool to bring into Gehennom and other dark areas (e.g. to enable jumping), and can always be rubbed for a wish once the hero no longer needs the light. A hero that reaches the Elemental Planes or the Astral Plane with any leftover magic lamps should bless them for the best chance of a wish and use the remaining light from the resulting oil lamp(s) to light their way through the level.

History

The magic lamp first appears in NetHack 2.3e.

Origin

The idea of a djinni dwelling in a magic lamp was popularized by the Middle-Eastern folk tale Aladdin, which is one of the best-known tales associated with The Book of One Thousand and One Nights (The Arabian Nights), although it is not contained in the original book: the tale of Alaadin was added by the French translator Antoine Galland, based on a folk tale he heard from the Syrian storyteller Hanna Diyab.

The tale has many variations, and the lamp is typically an item that the impoverished Aladdin retrieves from a booby-trapped cave for a sorcerer pretending to be a sibling of his late father. After escaping the cave with the aid of a djinni in a magic ring, Aladdin brings the lamp to his mother, who tries to rub it clean so they can sell it to buy food for their supper; this releases a second, far more powerful genie who is bound to do the bidding of the person holding the lamp.

Variants

Some NetHack variants raise the magic lamp's base price.

SLASH'EM

In SLASH'EM, the magic lamp's base cost is increased to 1000zm, and still more expensive magic lamps can be found in the black market. SLASH'EM also adds the magic candle, which acts as a permanent light source, and obtaining one means that magic lamps can be safely rubbed for their wishes.

The Sunless Sea is a special level that features a guaranteed magic lamp, although it may be underwater.

UnNetHack

Main article: UnNetHack wishing

In UnNetHack, wishes from magic lamps cannot produce magical items. Magic lamps themselves are an eligible wish, but can only be obtained from a wand of wishing.

The black market in UnNetHack can stock magic lamps at exorbitant prices.

UnNetHack incorporates the advent calendar patch, where the magic lamp is one of many possible 'Christmas presents' in the 24th room of the branch.

The the Watcher in the Water is always generated with an uncursed magic lamp.

dNetHack

In dNetHack, notdNetHack and notnotdNetHack, The Sea contains a guaranteed magic lamp, like the Sunless Sea of SLASH'EM. Each of the level's maps also has a guaranteed amulet of magical breathing in the event the lamp is underwater.

NetHack Fourk

In NetHack Fourk, it is possible to use a blessed scroll of wishing to wish for a magic lamp.

EvilHack

In EvilHack, magic lamps can be wished for. Additionally, cursed magic lamps give off darkness instead of light; the aura of darkness covers the same radius, and overrides any light source. A cursed magic lamp is one of a very few items that act as sources of darkness, making them ideal tools for any drow hero.

References

  1. src/apply.c in NetHack 3.6.7, line 1484: dorub function, calls djinni_from_bottle
  2. src/potion.c in NetHack 3.6.7, line 2321: djinni_from_bottle() function